package cn.cheqi.recovery.api.mapper;

import cn.cheqi.recovery.api.entity.User;
import cn.cheqi.recovery.api.vo.OrderVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Robin
 * @since 2020-02-23
 */
@Repository("apiUserMapper")
public interface UserMapper extends BaseMapper<User> {

    /**
     * 通过业主ID列出属于该业主的所有订单详情
     * @param userId
     * @return
     */
    List<OrderVO> findOrdersByUserId(@Param("userId") Long userId, Page<User> page);
}
